<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pin: PROTO API</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pin
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">PROTO API<div class="ingroups"><a class="el" href="group__API__REF.html">Instrumentation API Reference</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gacb4faa1f3649fce55756313c6259519f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PROTO.html#gacb4faa1f3649fce55756313c6259519f">PIN_PARG</a>(t)&#160;&#160;&#160;<a class="el" href="struct__PinPargClass.html">_PinPargClass</a>&lt; t &gt;::parg()</td></tr>
<tr class="separator:gacb4faa1f3649fce55756313c6259519f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf8061627abf953100e29bd3f031ded2c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PROTO.html#gaf8061627abf953100e29bd3f031ded2c">PIN_PARG_AGGREGATE</a>(t)&#160;&#160;&#160;_PinParg(PARG_AGGREGATE, sizeof(t))</td></tr>
<tr class="separator:gaf8061627abf953100e29bd3f031ded2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3fbcb1f92a17fcc24febac0676165ca2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PROTO.html#ga3fbcb1f92a17fcc24febac0676165ca2">PIN_PARG_ENUM</a>(t)&#160;&#160;&#160;_PinParg(PARG_ENUM, sizeof(t))</td></tr>
<tr class="separator:ga3fbcb1f92a17fcc24febac0676165ca2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeebb4a42707b704ebf214a06a6bf4e62"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PROTO.html#gaeebb4a42707b704ebf214a06a6bf4e62">PIN_PARG_END</a>()&#160;&#160;&#160;_PinParg(PARG_END, 0)</td></tr>
<tr class="separator:gaeebb4a42707b704ebf214a06a6bf4e62"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga554ff954c3ea33bb537f30e3b500ef1c"><td class="memItemLeft" align="right" valign="top">typedef PROTO_CLASS *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PROTO.html#ga554ff954c3ea33bb537f30e3b500ef1c">PROTO</a></td></tr>
<tr class="separator:ga554ff954c3ea33bb537f30e3b500ef1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gacfd9f3c8dc22310ce9b9152e8c61b17c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PROTO.html#gacfd9f3c8dc22310ce9b9152e8c61b17c">CALLINGSTD_TYPE</a> { <br />
&#160;&#160;<b>CALLINGSTD_INVALID</b>, 
<br />
&#160;&#160;<b>CALLINGSTD_DEFAULT</b>, 
<br />
&#160;&#160;<b>CALLINGSTD_CDECL</b>, 
<br />
&#160;&#160;<b>CALLINGSTD_REGPARMS</b>, 
<br />
&#160;&#160;<b>CALLINGSTD_STDCALL</b>, 
<br />
&#160;&#160;<b>CALLINGSTD_ART</b>
<br />
 }</td></tr>
<tr class="separator:gacfd9f3c8dc22310ce9b9152e8c61b17c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga59e26fa7c51d677aaac419e05bfb1305"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PROTO.html#ga59e26fa7c51d677aaac419e05bfb1305">PARG_TYPE</a> { <br />
&#160;&#160;<b>PARG_INVALID</b>, 
<br />
&#160;&#160;<b>PARG_POINTER</b>, 
<br />
&#160;&#160;<b>PARG_BOOL</b>, 
<br />
&#160;&#160;<b>PARG_CHAR</b>, 
<br />
&#160;&#160;<b>PARG_UCHAR</b>, 
<br />
&#160;&#160;<b>PARG_SCHAR</b>, 
<br />
&#160;&#160;<b>PARG_SHORT</b>, 
<br />
&#160;&#160;<b>PARG_USHORT</b>, 
<br />
&#160;&#160;<b>PARG_INT</b>, 
<br />
&#160;&#160;<b>PARG_UINT</b>, 
<br />
&#160;&#160;<b>PARG_LONG</b>, 
<br />
&#160;&#160;<b>PARG_ULONG</b>, 
<br />
&#160;&#160;<b>PARG_LONGLONG</b>, 
<br />
&#160;&#160;<b>PARG_ULONGLONG</b>, 
<br />
&#160;&#160;<b>PARG_FLOAT</b>, 
<br />
&#160;&#160;<b>PARG_DOUBLE</b>, 
<br />
&#160;&#160;<b>PARG_VOID</b>, 
<br />
&#160;&#160;<b>PARG_ENUM</b>, 
<br />
&#160;&#160;<b>PARG_AGGREGATE</b>, 
<br />
&#160;&#160;<b>PARG_END</b>
<br />
 }</td></tr>
<tr class="separator:ga59e26fa7c51d677aaac419e05bfb1305"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gae01d20f7fd56e3eeebebe41009e7ff89"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__PROTO.html#ga554ff954c3ea33bb537f30e3b500ef1c">PROTO</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PROTO.html#gae01d20f7fd56e3eeebebe41009e7ff89">PROTO_Allocate</a> (<a class="el" href="structPARG__T.html">PARG_T</a> returnArg, <a class="el" href="group__PROTO.html#gacfd9f3c8dc22310ce9b9152e8c61b17c">CALLINGSTD_TYPE</a> cstype, const char *name,...)</td></tr>
<tr class="separator:gae01d20f7fd56e3eeebebe41009e7ff89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac85d3ff3845126b629d630f6f36eae70"><td class="memItemLeft" align="right" valign="top">VOID&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__PROTO.html#gac85d3ff3845126b629d630f6f36eae70">PROTO_Free</a> (<a class="el" href="group__PROTO.html#ga554ff954c3ea33bb537f30e3b500ef1c">PROTO</a> proto)</td></tr>
<tr class="separator:gac85d3ff3845126b629d630f6f36eae70"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This API describes an application routine. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="gacb4faa1f3649fce55756313c6259519f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacb4faa1f3649fce55756313c6259519f">&#9670;&nbsp;</a></span>PIN_PARG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PIN_PARG</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">t</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="struct__PinPargClass.html">_PinPargClass</a>&lt; t &gt;::parg()</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Macros used to simplify the passing of function prototype arguments. The macro will pass the type and size of each argument specified. When passing an argument to <a class="el" href="group__PROTO.html#gae01d20f7fd56e3eeebebe41009e7ff89">PROTO_Allocate()</a>, use these macros. As an example, <a class="el" href="group__PROTO.html#gacb4faa1f3649fce55756313c6259519f">PIN_PARG(int)</a> will pass the PARG_TYPE PARG_INT and the size of an integer to <a class="el" href="group__PROTO.html#gae01d20f7fd56e3eeebebe41009e7ff89">PROTO_Allocate()</a>. </p>

</div>
</div>
<a id="gaf8061627abf953100e29bd3f031ded2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf8061627abf953100e29bd3f031ded2c">&#9670;&nbsp;</a></span>PIN_PARG_AGGREGATE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PIN_PARG_AGGREGATE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">t</td><td>)</td>
          <td>&#160;&#160;&#160;_PinParg(PARG_AGGREGATE, sizeof(t))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Type and size of an aggregate in <a class="el" href="group__PROTO.html#gae01d20f7fd56e3eeebebe41009e7ff89">PROTO_Allocate()</a> See <a class="el" href="group__PROTO.html#gacb4faa1f3649fce55756313c6259519f">PIN_PARG</a> </p>

</div>
</div>
<a id="gaeebb4a42707b704ebf214a06a6bf4e62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeebb4a42707b704ebf214a06a6bf4e62">&#9670;&nbsp;</a></span>PIN_PARG_END</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PIN_PARG_END</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>&#160;&#160;&#160;_PinParg(PARG_END, 0)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Ends a list of arguments in <a class="el" href="group__PROTO.html#gae01d20f7fd56e3eeebebe41009e7ff89">PROTO_Allocate()</a> See <a class="el" href="group__PROTO.html#gacb4faa1f3649fce55756313c6259519f">PIN_PARG</a> </p>

</div>
</div>
<a id="ga3fbcb1f92a17fcc24febac0676165ca2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3fbcb1f92a17fcc24febac0676165ca2">&#9670;&nbsp;</a></span>PIN_PARG_ENUM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PIN_PARG_ENUM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">t</td><td>)</td>
          <td>&#160;&#160;&#160;_PinParg(PARG_ENUM, sizeof(t))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Type and size of an enum in <a class="el" href="group__PROTO.html#gae01d20f7fd56e3eeebebe41009e7ff89">PROTO_Allocate()</a> See <a class="el" href="group__PROTO.html#gacb4faa1f3649fce55756313c6259519f">PIN_PARG</a> </p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga554ff954c3ea33bb537f30e3b500ef1c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga554ff954c3ea33bb537f30e3b500ef1c">&#9670;&nbsp;</a></span>PROTO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef PROTO_CLASS* <a class="el" href="group__PROTO.html#ga554ff954c3ea33bb537f30e3b500ef1c">PROTO</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>List of function prototype arguments. See <a class="el" href="group__PROTO.html#gae01d20f7fd56e3eeebebe41009e7ff89">PROTO_Allocate()</a> for its use. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="gacfd9f3c8dc22310ce9b9152e8c61b17c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacfd9f3c8dc22310ce9b9152e8c61b17c">&#9670;&nbsp;</a></span>CALLINGSTD_TYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PROTO.html#gacfd9f3c8dc22310ce9b9152e8c61b17c">CALLINGSTD_TYPE</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Type of calling standards used for compiling the function. See <a class="el" href="group__PROTO.html#gae01d20f7fd56e3eeebebe41009e7ff89">PROTO_Allocate()</a> for its use. CALLINGSTD_DEFAULT is the default calling standard for the platform. This is the recommended option. </p>

</div>
</div>
<a id="ga59e26fa7c51d677aaac419e05bfb1305"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga59e26fa7c51d677aaac419e05bfb1305">&#9670;&nbsp;</a></span>PARG_TYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__PROTO.html#ga59e26fa7c51d677aaac419e05bfb1305">PARG_TYPE</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Function prototype argument types. See <a class="el" href="group__PROTO.html#gae01d20f7fd56e3eeebebe41009e7ff89">PROTO_Allocate()</a> for its use. </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gae01d20f7fd56e3eeebebe41009e7ff89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae01d20f7fd56e3eeebebe41009e7ff89">&#9670;&nbsp;</a></span>PROTO_Allocate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__PROTO.html#ga554ff954c3ea33bb537f30e3b500ef1c">PROTO</a> PROTO_Allocate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structPARG__T.html">PARG_T</a>&#160;</td>
          <td class="paramname"><em>returnArg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__PROTO.html#gacfd9f3c8dc22310ce9b9152e8c61b17c">CALLINGSTD_TYPE</a>&#160;</td>
          <td class="paramname"><em>cstype</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Allocate and initialize a function prototype. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">returnArg</td><td>The return argument type and size. See <a class="el" href="group__PROTO.html#gacb4faa1f3649fce55756313c6259519f">PIN_PARG</a>. </td></tr>
    <tr><td class="paramname">cstype</td><td>The calling standard used for compiling this function (CALLINGSTD_DEFAULT recommended). </td></tr>
    <tr><td class="paramname">name</td><td>The name of the function. </td></tr>
    <tr><td class="paramname">...</td><td>List of function argument type and size. See <a class="el" href="group__PROTO.html#gacb4faa1f3649fce55756313c6259519f">PIN_PARG</a> for the recommended method of passing function arguments. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>currently PARG_FLOAT, PARG_DOUBLE are supported as return type only and can not be used as function argument types. Any other PRG_* that does not fit in an integer register are not supported neither as function argument nor as return type of replacement functions.</dd></dl>
<p><a class="el" href="group__PROTO.html#gaeebb4a42707b704ebf214a06a6bf4e62">PIN_PARG_END()</a> must end the argument list, even if the function has no arguments. </p><dl class="section return"><dt>Returns</dt><dd>proto A pointer to a function prototype. This is an opaque type.</dd></dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
<a id="gac85d3ff3845126b629d630f6f36eae70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac85d3ff3845126b629d630f6f36eae70">&#9670;&nbsp;</a></span>PROTO_Free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VOID PROTO_Free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__PROTO.html#ga554ff954c3ea33bb537f30e3b500ef1c">PROTO</a>&#160;</td>
          <td class="paramname"><em>proto</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Free the specified function prototype. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">proto</td><td>A pointer to a function prototype.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT &amp; Probe<br  />
<b>O/S</b>: Linux, Windows &amp; macOS*<br  />
<b>CPU:</b> All<br  />
</dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
